import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'

import reducer from './reducers'

//  const store =createStore(reducer,composeWithDevTools());

// 第一个参数reducer，第二个参数是applyMiddleleware，里面是中间件，外面是redux插件
export default createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));